<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\agent\model;

class AgentLevel extends \app\BaseModel
{
    protected $name = "longbing_card_agent_level";
    public function levelList($dis, $page = 10)
    {
        $list = $this->where($dis)->order("top desc,id desc")->paginate($page)->toArray();
        return $list;
    }
    public function levelAdd($data)
    {
        $data["create_time"] = time();
        $data["update_time"] = time();
        $data["status"] = 1;
        $res = $this->insert($data);
        return $res;
    }
    public function levelUpdate($dis, $data)
    {
        $data["update_time"] = time();
        $res = $this->where($dis)->update($data);
        return $res;
    }
    public function levelInfo($dis)
    {
        $data = $this->where($dis)->find();
        return !empty($data) ? $data->toArray() : [];
    }
    public function levelSelect($dis)
    {
        $data = $this->where($dis)->order("top desc,id desc")->select();
        return !empty($data) ? $data->toArray() : [];
    }
}

?>